<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> 
  <head>
    <base href="<?= $config['site.base'] ?>">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <link type="text/css" rel="stylesheet" href="themes/default/default.css"/>
    <title><?= $doctitle ?></title>
  <?= implode(' ', $config['pageheaders']) ?>
  </head>
  <body>
    <script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
    <div id="container">
    
	  <div id="topmenu"><? 
        foreach ($config['menu'] as $item) { ?>
        <a <?= $item['style'] ?> href="<?= $item['url'] ?>"><?= $item['caption'] ?></a>
      <? } 
        profile_point('- account menu');
      ?></div>
      <h1>
        <?= getDefault($config['pagetitle'], $config['site.name']) ?>
      </h1>
      <div id="content">
        <?
        if ($ctrObj->character->message != '')
          print('<div class="banner">'.$ctrObj->character->message.'</div>');
        if ($ctrObj->message != '')
          print('<div class="banner">'.$ctrObj->message.'</div>');
        ?>
        <?= $content ?>
        <? profile_point('- content'); ?>
    </div>
    
    </div>
    <script type="text/javascript">  
      FB_RequireFeatures(["XFBML"], function(){ 
        FB.Facebook.init("<?= $config['fb']['api_key'] ?>", "<?= $config['site.base'] ?>xd_receiver.htm"); 
        }); 
    </script> 
  </body>
</html>